#example 1

a = {

    'a' : [1,2,3,4],
    'b' : {4,5,4}

}

print (a['a'])
print (a['b'])

#example 2
from collections import defaultdict

default = defaultdict(list)
default['a'].append(1)
default['a'].append(2)
default['a'].append(3)

#we have key b which value is empty list
print (default['b'])
print (default)

#example 3
dictionary = {'Name': 'Zara', 'Age': 7}

#set default value if key not exist
print ("Value : %s" %  dictionary.setdefault('Age', None))
print ("Value : %s" %  dictionary.setdefault('Sex', None))

print (dictionary['Name'])
print (dictionary['Age'])
print (dictionary['Sex'])
print (dictionary)
